package com.yuyou.fn.api;

import com.yuyou.fn.api.dto.CustomerUserDto;
import com.yuyou.fn.api.dto.StudentDto;

import java.util.Collection;

public interface CustomerUserService {

    /**
     * 手机号码登陆
     * @param phoneNo
     * @param code
     * @return
     */
    CustomerUserDto login(String phoneNo , String code );


    /**
     * 根据userId查找
     * @param userId
     * @return
     */
    CustomerUserDto findByUserId(Long userId) ;

    /**
     * 更改用户信息
     * @param userId
     * @param password
     * @param phoneNo
     * @param avatarUrl
     * @param sex
     * @param location
     * @return
     */
    boolean updateCustomerUserInfo(Long userId, String password, String phoneNo,String avatarUrl ,Integer sex ,String location );

    /**
     * 获取绑定学员
     * @param userId
     * @return
     */
    Collection<StudentDto> findBindStudent(Long userId);

    /**
     * 绑定学员
     * @param userId
     * @param studentId
     * @return
     */
    boolean bindStudent(Long userId , Long studentId );

    /**
     * 解绑学员
     * @param userId
     * @param studentId
     * @return
     */
    boolean unbindStudent(Long userId , Long studentId );

    /**
     * 是否绑定过学员
     * @param userId
     * @param studentId
     * @return
     */
    boolean isBindStudent(Long userId , Long studentId );









}
